package com.pool;

import java.util.concurrent.*;


public class TreadPoolUtils {

    private static ExecutorService tokenConsumerPool = new ThreadPoolExecutor(
            5,
            20,
            60L,
            TimeUnit.SECONDS,
            new LinkedBlockingQueue<>(1024),
            Executors.defaultThreadFactory(),
            new ThreadPoolExecutor.AbortPolicy());

    public static ExecutorService getTokenConsumerPool() {
        return tokenConsumerPool;
    }
}
